package com.source.multithread.thread;

/**
 * @Author wengqy
 * @Date 2020/12/19
 */
public class DownloadThread extends Thread {


    private String url;
    private String name;

    public DownloadThread(String url, String name){
        this.url=url;
        this.name=name;
    }

    @Override
    public void run() {
       DownloadPic  downloadPic  = new DownloadPic();
         downloadPic.download(url,name);
    }


    public static void main(String[] args) {
        DownloadThread th = new DownloadThread("https://dss0.baidu.com/73t1bjeh1BF3odCf/it/u=1561546013,1259770086&fm=85&s=1A21EC02EE337FAF0854119903001062","1.jpg");
        DownloadThread th2 = new DownloadThread("https://dss0.baidu.com/73t1bjeh1BF3odCf/it/u=3506652242,2368086075&fm=85&s=8C9F875066675AAE078DE4D6030050F1","2.jpg");
        DownloadThread th3 = new DownloadThread("https://dss0.baidu.com/73t1bjeh1BF3odCf/it/u=2623032014,2137091052&fm=85&s=F4C2BE56F74162EE0E5EEC7C03004071","3.jpg");

        th.start();
        th2.start();
        th3.start();
        System.out.println("........................");
    }

}
